home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / game / wins1726.zip / FRACTINT.H < prev    next >
C/C++ Source or Header  |  1992-01-28  |  19KB  |  572 lines

  1. /* FRACTINT.H - common structures and values for the FRACTINT routines */
  2.  
  3.  
  4. #ifndef C6
  5. #define _fastcall    /* _fastcall is a Microsoft C6.00 extension */
  6. #endif
  7.  
  8. #ifdef __TURBOC__
  9. #   define _bios_printer(a,b,c)   biosprint((a),(c),(b))
  10. #   define _bios_serialcom(a,b,c) bioscom((a),(c),(b))
  11. #else
  12. #   define MK_FP(seg,off) (void far *)( (((long)(seg))<<16) | \
  13.                     ((unsigned)(off)) )
  14. #endif
  15.  
  16.  
  17. #define MAXPIXELS 2048        /* Maximum pixel count across/down the screen */
  18. #define SCREENASPECT 0.75    /* Assumed overall screen dimensions, y/x     */
  19.  
  20. struct videoinfo {        /* All we need to know about a Video Adapter */
  21.     char    name[26];    /* Adapter name (IBM EGA, etc)        */
  22.     char    comment[26];    /* Comments (UNTESTED, etc)        */
  23.     int    keynum;     /* key number used to invoked this mode */
  24.                 /* 2-10 = F2-10, 11-40 = S,C,A{F1-F10}    */
  25.     int    videomodeax;    /* begin with INT 10H, AX=(this)    */
  26.     int    videomodebx;    /*        ...and BX=(this)    */
  27.     int    videomodecx;    /*        ...and CX=(this)    */
  28.     int    videomodedx;    /*        ...and DX=(this)    */
  29.                 /* NOTE:  IF AX==BX==CX==0, SEE BELOW    */
  30.     int    dotmode;    /* video access method used by asm code */
  31.                 /*    1 == BIOS 10H, AH=12,13 (SLOW)    */
  32.                 /*    2 == access like EGA/VGA    */
  33.                 /*    3 == access like MCGA        */
  34.                 /*    4 == Tseng-like  SuperVGA*256    */
  35.                 /*    5 == P'dise-like SuperVGA*256   */
  36.                 /*    6 == Vega-like     SuperVGA*256    */
  37.                 /*    7 == "Tweaked" IBM-VGA ...*256  */
  38.                 /*    8 == "Tweaked" SuperVGA ...*256 */
  39.                 /*    9 == Targa Format        */
  40.                 /*    10 = Hercules            */
  41.                 /*    11 = "disk video" (no screen)   */
  42.                 /*    12 = 8514/A            */
  43.                 /*    13 = CGA 320x200x4, 640x200x2    */
  44.                 /*    14 = Tandy 1000         */
  45.                 /*    15 = TRIDENT  SuperVGA*256    */
  46.                 /*    16 = Chips&Tech SuperVGA*256    */
  47.     int    xdots;        /* number of dots across the screen    */
  48.     int    ydots;        /* number of dots down the screen    */
  49.     int    colors;     /* number of colors available        */
  50.     };
  51.  
  52.  
  53. #define INFO_ID     "Fractal"
  54. #define FRACTAL_INFO   struct fractal_info
  55.  
  56. struct fractal_info            /*  for saving data in GIF file     */
  57. {
  58.     char info_id[8];        /* Unique identifier for info block */
  59.     int iterations;
  60.     int fractal_type;        /* 0=Mandelbrot 1=Julia 2= ... */
  61.     double    xmin;
  62.     double    xmax;
  63.     double    ymin;
  64.     double    ymax;
  65.     double    creal;
  66.     double    cimag;
  67.     int    videomodeax;
  68.     int    videomodebx;
  69.     int    videomodecx;
  70.     int    videomodedx;
  71.     int    dotmode;
  72.     int    xdots;
  73.     int    ydots;
  74.     int colors;
  75.     int version;        /* used to be 'future[0]' */
  76.     float parm3;
  77.     float parm4;
  78.     float potential[3];
  79.     int rseed;
  80.     int rflag;
  81.     int biomorph;
  82.     int inside;
  83.     int logmap;
  84.     float invert[3];
  85.     int decomp[2];
  86.     int symmetry;
  87.     /* version 2 stuff */
  88.     int init3d[16];
  89.     int previewfactor;
  90.     int xtrans;
  91.     int ytrans;
  92.     int red_crop_left;
  93.     int red_crop_right;
  94.     int blue_crop_left;
  95.     int blue_crop_right;
  96.     int red_bright;
  97.     int blue_bright;
  98.     int xadjust;
  99.     int eyeseparation;
  100.     int glassestype;
  101.     /* version 3 stuff, release 13 */
  102.     int outside;
  103.     /* version 4 stuff, release 14 */
  104.     double x3rd;      /* 3rd corner */
  105.     double y3rd;
  106.     char stdcalcmode;      /* 1/2/g/b */
  107.     char useinitorbit;      /* init Mandelbrot orbit flag */
  108.     int calc_status;      /* resumable, finished, etc */
  109.     long tot_extend_len;  /* total length of extension blocks in .gif file */
  110.     int distest;
  111.     int floatflag;
  112.     int bailout;
  113.     long calctime;
  114.     unsigned char trigndx[4]; /* which trig functions selected */
  115.     int finattract;
  116.     double initorbit[2];  /* init Mandelbrot orbit values */
  117.     int periodicity;      /* periodicity checking */
  118.     /* version 5 stuff, release 15 */
  119.     int pot16bit;      /* save 16 bit continuous potential info */
  120.     float faspectratio;   /* finalaspectratio, y/x */
  121.     int system;       /* 0 for dos, 1 for windows */
  122.     int release;      /* release number, with 2 decimals implied */
  123.     int flag3d;       /* stored only for now, for future use */
  124.     int transparent[2];
  125.     int ambient;
  126.     int haze;
  127.     int randomize;
  128.     /* version 6 stuff, release 15.x */
  129.     int rotate_lo;
  130.     int rotate_hi;
  131.     int distestwidth;
  132.     /* version 7 stuff, release 16 */
  133.     double dparm3;
  134.     double dparm4;
  135.     /* version 8 stuff, release 17 */
  136.     int fillcolor;
  137.     int future[31];      /* for stuff we haven't thought of yet */
  138. };
  139.  
  140. #define MAXVIDEOMODES 300    /* maximum entries in fractint.cfg      */
  141. #define MAXVIDEOTABLE 40    /* size of the resident video modes table */
  142.  
  143. #if defined(PUTTHEMHERE)    /* this MUST be defined ONLY in FRACTINT.C */
  144.  
  145. struct videoinfo videoentry;
  146.  
  147. #else
  148.  
  149. extern struct videoinfo videoentry;
  150.  
  151. #endif
  152.  
  153. #define NUMIFS      32     /* number of ifs functions in ifs array */
  154. #define IFSPARM    7     /* number of ifs parameters */
  155. #define IFS3DPARM 13     /* number of ifs 3D parameters */
  156.  
  157. #define ITEMNAMELEN 18     /* max length of names in .frm/.l/.ifs/.fc */
  158.  
  159. /* defines for symmetry */
  160. #define  NOSYM        0
  161. #define  XAXIS_NOPARM  -1
  162. #define  XAXIS        1
  163. #define  YAXIS_NOPARM  -2
  164. #define  YAXIS        2
  165. #define  XYAXIS_NOPARM -3
  166. #define  XYAXIS     3
  167. #define  ORIGIN_NOPARM -4
  168. #define  ORIGIN     4
  169. #define  PI_SYM_NOPARM -5
  170. #define  PI_SYM     5
  171. #define  XAXIS_NOIMAG  -6
  172. #define  XAXIS_NOREAL    6
  173. #define  NOPLOT        99
  174. #define  SETUP_SYM    100
  175.  
  176. /* bitmask defines for fractalspecific flags */
  177. #define  NOZOOM     1    /* zoombox not allowed at all       */
  178. #define  NOGUESS    2    /* solid guessing not allowed       */
  179. #define  NOTRACE    4    /* boundary tracing not allowed       */
  180. #define  NOROTATE    8    /* zoombox rotate/stretch not allowed */
  181. #define  NORESUME      16    /* can't interrupt and resume         */
  182. #define  INFCALC       32    /* this type calculates forever       */
  183. #define  TRIG1           64    /* number of trig functions in formula*/
  184. #define  TRIG2          128
  185. #define  TRIG3          192
  186. #define  TRIG4          256
  187. #define  WINFRAC      512    /* supported in WinFrac           */
  188. #define  PARMS3D     1024    /* uses 3d parameters           */
  189.  
  190. #define AUTOINVERT -123456.789
  191.  
  192. #define N_ATTR 8            /* max number of attractors    */
  193.  
  194. extern    long     l_at_rad;    /* finite attractor radius  */
  195. extern    double     f_at_rad;    /* finite attractor radius  */
  196.  
  197. struct fractalspecificstuff
  198. {
  199.    char  *name;             /* name of the fractal */
  200.    char  *param[4];            /* name of the parameters */
  201.    float paramvalue[4];         /* default parameter values */
  202.    int     helptext;            /* helpdefs.h HT_xxxx, -1 for none */
  203.    int     helpformula;            /* helpdefs.h HF_xxxx, -1 for none */
  204.    int     flags;             /* constraints, bits defined above */
  205.    float xmin;                /* default XMIN corner */
  206.    float xmax;                /* default XMAX corner */
  207.    float ymin;                /* default YMIN corner */
  208.    float ymax;                /* default YMAX corner */
  209.    int     isinteger;            /* 1 if integerfractal, 0 otherwise */
  210.    int     tojulia;            /* mandel-to-julia switch */
  211.    int     tomandel;            /* julia-to-mandel switch */
  212.    int     tofloat;            /* integer-to-floating switch */
  213.    int     symmetry;            /* applicable symmetry logic
  214.                        0 = no symmetry
  215.                       -1 = y-axis symmetry (If No Params)
  216.                        1 = y-axis symmetry
  217.                       -2 = x-axis symmetry (No Parms)
  218.                        2 = x-axis symmetry
  219.                       -3 = y-axis AND x-axis (No Parms)
  220.                        3 = y-axis AND x-axis symmetry
  221.                       -4 = polar symmetry (No Parms)
  222.                        4 = polar symmetry
  223.                        5 = PI (sin/cos) symmetry
  224.                        6 = NEWTON (power) symmetry
  225.                                 */
  226.    int (*orbitcalc)();        /* function that calculates one orbit */
  227.    int (*per_pixel)();        /* once-per-pixel init */
  228.    int (*per_image)();        /* once-per-image setup */
  229.    int (*calctype)();        /* name of main fractal function */
  230.    int orbit_bailout;        /* usual bailout value for orbit calc */
  231. };
  232.  
  233. extern struct fractalspecificstuff far fractalspecific[];
  234. extern struct fractalspecificstuff far *curfractalspecific;
  235.  
  236.  
  237. #if defined(PUTTHEMHERE)    /* this MUST be defined ONLY in FRACTINT.C */
  238.  
  239. int helpmode;
  240.  
  241. #else
  242.  
  243. extern int helpmode;
  244.  
  245. #endif
  246.  
  247. #define DEFAULTFRACTALTYPE    ".gif"
  248. #define ALTERNATEFRACTALTYPE    ".fra"
  249.  
  250. #include <math.h>
  251.  
  252. #ifndef _LCOMPLEX_DEFINED
  253. struct lcomplex {
  254.    long x, y;
  255. };
  256. #define _LCOMPLEX_DEFINED
  257. #endif
  258.  
  259. #ifndef sqr
  260. #define sqr(x) ((x)*(x))
  261. #endif
  262.  
  263. #ifndef lsqr
  264. #define lsqr(x) (multiply((x),(x),bitshift))
  265. #endif
  266.  
  267. #define CMPLXmod(z)      (sqr((z).x)+sqr((z).y))
  268. #define CMPLXconj(z)    ((z).y =  -((z).y))
  269. #define LCMPLXmod(z)       (lsqr((z).x)+lsqr((z).y))
  270. #define LCMPLXconj(z)    ((z).y =  -((z).y))
  271.  
  272. typedef  struct complex CMPLX;
  273. typedef  struct lcomplex LCMPLX;
  274.  
  275. /* 3D stuff - formerly in 3d.h */
  276. #ifndef dot_product
  277. #define dot_product(v1,v2)  ((v1)[0]*(v2)[0]+(v1)[1]*(v2)[1]+(v1)[2]*(v2)[2])  /* TW 7-09-89 */
  278. #endif
  279.  
  280. #define    CMAX    4   /* maximum column (4 x 4 matrix) */
  281. #define    RMAX    4   /* maximum row     (4 x 4 matrix) */
  282. #define    DIM       3   /* number of dimensions */
  283.  
  284. typedef double MATRIX [RMAX] [CMAX];  /* matrix of doubles */
  285. typedef int   IMATRIX [RMAX] [CMAX];  /* matrix of ints    */
  286. typedef long  LMATRIX [RMAX] [CMAX];  /* matrix of longs   */
  287.  
  288. /* A MATRIX is used to describe a transformation from one coordinate
  289. system to another.  Multiple transformations may be concatenated by
  290. multiplying their transformation matrices. */
  291.  
  292. typedef double VECTOR [DIM];  /* vector of doubles */
  293. typedef int   IVECTOR [DIM];  /* vector of ints    */
  294. typedef long  LVECTOR [DIM];  /* vector of longs   */
  295.  
  296. /* A VECTOR is an array of three coordinates [x,y,z] representing magnitude
  297. and direction. A fourth dimension is assumed to always have the value 1, but
  298. is not in the data structure */
  299.  
  300.  
  301. #define PI 3.14159265358979323846
  302.  
  303. #define SPHERE      init3d[0]        /* sphere? 1 = yes, 0 = no  */
  304. #define ILLUMINE  (FILLTYPE>4)    /* illumination model        */
  305.  
  306. /* regular 3D */
  307. #define XROT      init3d[1]    /* rotate x-axis 60 degrees */
  308. #define YROT      init3d[2]    /* rotate y-axis 90 degrees */
  309. #define ZROT      init3d[3]    /* rotate x-axis  0 degrees */
  310. #define XSCALE      init3d[4]    /* scale x-axis, 90 percent */
  311. #define YSCALE      init3d[5]    /* scale y-axis, 90 percent */
  312.  
  313. /* sphere 3D */
  314. #define PHI1      init3d[1]    /* longitude start, 180     */
  315. #define PHI2      init3d[2]    /* longitude end ,   0        */
  316. #define THETA1      init3d[3]        /* latitude start,-90 degrees */
  317. #define THETA2      init3d[4]        /* latitude stop,  90 degrees */
  318. #define RADIUS      init3d[5]    /* should be user input */
  319.  
  320. /* common parameters */
  321. #define ROUGH      init3d[6]    /* scale z-axis, 30 percent */
  322. #define WATERLINE init3d[7]    /* water level            */
  323. #define FILLTYPE  init3d[8]    /* fill type            */
  324. #define ZVIEWER   init3d[9]    /* perspective view point   */
  325. #define XSHIFT      init3d[10]    /* x shift */
  326. #define YSHIFT      init3d[11]    /* y shift */
  327. #define XLIGHT      init3d[12]    /* x light vector coordinate */
  328. #define YLIGHT      init3d[13]    /* y light vector coordinate */
  329. #define ZLIGHT      init3d[14]    /* z light vector coordinate */
  330. #define LIGHTAVG  init3d[15]    /* number of points to average */
  331.  
  332. #ifndef TRUE
  333. #define TRUE 1
  334. #define FALSE 0
  335. #endif
  336.  
  337.  
  338. struct workliststuff    /* work list entry for std escape time engines */
  339. {
  340.     int xxstart;    /* screen window for this entry */
  341.     int xxstop;
  342.     int yystart;
  343.     int yystop;
  344.     int yybegin;    /* start row within window, for 2pass/ssg resume */
  345.     int sym;    /* if symmetry in window, prevents bad combines */
  346.     int pass;    /* for 2pass and solid guessing */
  347. };
  348. #define MAXCALCWORK 12
  349.  
  350. extern unsigned char trigndx[];
  351. extern void (*ltrig0)(), (*ltrig1)(), (*ltrig2)(), (*ltrig3)();
  352. extern void (*dtrig0)(), (*dtrig1)(), (*dtrig2)(), (*dtrig3)();
  353.  
  354. struct trig_funct_lst
  355. {
  356.     char *name;
  357.     void (*lfunct)();
  358.     void (*dfunct)();
  359.     void (*mfunct)();
  360. } ;
  361. extern struct trig_funct_lst trigfn[];
  362.  
  363. /* function prototypes */
  364.  
  365. extern    void   buzzer(int);
  366. extern    int    calcfract(void);
  367. extern    int    calcmand(void);
  368. extern  int    calcmandfp(void);
  369. extern    int    check_key(void);
  370. extern    int    complex_mult(CMPLX, CMPLX, CMPLX *);
  371. extern    int    complex_div(CMPLX, CMPLX, CMPLX *);
  372. extern    int    complex_power(CMPLX, int, CMPLX *);
  373. extern    int    cross_product(double [], double [], double []);
  374. extern    void   drawbox(int);
  375. extern    unsigned int emmallocate(unsigned int);
  376. extern    void   emmclearpage(unsigned int, unsigned int);
  377. extern    void   emmdeallocate(unsigned int);
  378. extern    unsigned int emmgetfree(void);
  379. extern    void   emmgetpage(unsigned int, unsigned int);
  380. extern    unsigned char far *emmquery(void);
  381. extern far_strlen( char far *);
  382. extern far_strcpy( char far *, char far *);
  383. extern far_strcmp( char far *, char far *);
  384. extern far_stricmp(char far *, char far *);
  385. extern far_strnicmp(char far *, char far *,int);
  386. extern far_strcat( char far *, char far *);
  387. extern far_memset( void far *, char     , int);
  388. extern far_memcpy( void far *, void far *, int);
  389. extern far_memcmp( void far *, void far *, int);
  390. extern far_memicmp(void far *, void far *, int);
  391. extern    void far *farmemalloc(long);
  392. extern    void   farmemfree(void far *);
  393. extern    int    getakey(void);
  394. extern    int    _fastcall getcolor(int, int);
  395. extern    void   _fastcall putcolor(int, int, int);
  396. extern    void   (_fastcall *plot)(int, int, int);
  397. extern    void   _fastcall symPIplot(int,int,int);
  398. extern    void   _fastcall symPIplot2J(int,int,int);
  399. extern    void   _fastcall symPIplot4J(int,int,int);
  400. extern    void   _fastcall symplot2(int,int,int);
  401. extern    void   _fastcall symplot2Y(int,int,int);
  402. extern    void   _fastcall symplot2J(int,int,int);
  403. extern    void   _fastcall symplot4(int,int,int);
  404. extern    void   _fastcall symplot2basin(int,int,int);
  405. extern    void   _fastcall symplot4basin(int,int,int);
  406. extern    void   _fastcall noplot(int,int,int);
  407. extern    void   _fastcall draw_line(int,int,int,int,int);
  408. extern    int    has_8087(void );
  409. extern    void   putstring(int,int,int,unsigned char far *);
  410. extern    int    putstringcenter(int,int,int,int,char far *);
  411. extern    int    stopmsg(int,unsigned char far *);
  412. extern    void   identity(MATRIX);
  413. extern    int    Juliafp(void);
  414. extern    int    longvmultpersp(LVECTOR, LMATRIX, LVECTOR, LVECTOR, LVECTOR, int);
  415. extern    int    longpersp(LVECTOR, LVECTOR,int);
  416. extern    int    Lambda(void);
  417. extern    int    Lambdasine(void);
  418. extern    void   mat_mul(MATRIX, MATRIX, MATRIX);
  419. extern    void   main(int, char *[]);
  420. extern    int    Mandelfp(void);
  421. extern    long   multiply(long, long, int);
  422. extern    long   divide(long, long, int);
  423. extern    int    Newton(void);
  424. extern    int    perspective(double *v);
  425. extern    void   cdecl Print_Screen(void);
  426. extern    void   scale(double, double, double, MATRIX);
  427. extern    void   setvideomode(int, int, int, int);
  428. extern    int    Sierpinski(void);
  429. extern    void   spindac(int, int);
  430. extern    void   trans(double, double, double, MATRIX);
  431. extern    int    vmult(VECTOR,MATRIX,VECTOR);
  432. extern    void   xrot(double, MATRIX);
  433. extern    void   yrot(double, MATRIX);
  434. extern    void   zrot(double, MATRIX);
  435. extern    void   (_fastcall *standardplot)(int,int,int);
  436. extern    void   _fastcall plot3dsuperimpose16b(int,int,int);
  437. extern    void   _fastcall plot3dsuperimpose16(int,int,int);
  438. extern    void   _fastcall plot3dsuperimpose256(int,int,int);
  439. extern    void   _fastcall plotIFS3dsuperimpose256(int,int,int);
  440. extern    void   _fastcall plot3dalternate(int,int,int);
  441.  
  442. /* for overlay return stack */
  443.  
  444. #define ENTER_OVLY(ovlyid)\
  445.    extern int active_ovly;\
  446.    int prev_ovly;\
  447.    prev_ovly = active_ovly;\
  448.    active_ovly = ovlyid
  449. #define EXIT_OVLY active_ovly = prev_ovly
  450.  
  451. #define OVLY_MISCOVL   1
  452. #define OVLY_CMDFILES  2
  453. #define OVLY_HELP      3
  454. #define OVLY_PROMPTS   4
  455. #define OVLY_LOADFILE  5
  456. #define OVLY_ROTATE    6
  457. #define OVLY_PRINTER   7
  458. #define OVLY_LINE3D    8
  459. #define OVLY_ENCODER   9
  460. #define OVLY_CALCFRAC 10
  461. #define OVLY_INTRO    11
  462.  
  463. /* keys */
  464. #define   INSERT     1082
  465. #define   DELETE     1083
  466. #define   PAGE_UP     1073
  467. #define   PAGE_DOWN     1081
  468. #define   CTL_HOME     1119
  469. #define   CTL_END     1117
  470. #define   LEFT_ARROW     1075
  471. #define   RIGHT_ARROW     1077
  472. #define   UP_ARROW     1072
  473. #define   DOWN_ARROW     1080
  474. #define   LEFT_ARROW_2     1115
  475. #define   RIGHT_ARROW_2  1116
  476. #define   UP_ARROW_2     1141
  477. #define   DOWN_ARROW_2     1145
  478. #define   HOME         1071
  479. #define   END         1079
  480. #define   ENTER      13
  481. #define   ENTER_2     1013
  482. #define   TAB         9
  483. #define   ESC         27
  484. #define   SPACE      32
  485. #define   F1         1059
  486. #define   F2         1060
  487. #define   F3         1061
  488. #define   F4         1062
  489. #define   F5         1063
  490. #define   F6         1064
  491. #define   F7         1065
  492. #define   F8         1066
  493. #define   F9         1067
  494. #define   F10         1068
  495.  
  496. /* text colors */
  497. #define BLACK       0
  498. #define BLUE       1
  499. #define GREEN       2
  500. #define CYAN       3
  501. #define RED       4
  502. #define MAGENTA    5
  503. #define BROWN       6 /* dirty yellow on cga */
  504. #define WHITE       7
  505. /* use values below this for foreground only, they don't work background */
  506. #define GRAY       8 /* don't use this much - is black on cga */
  507. #define L_BLUE       9
  508. #define L_GREEN   10
  509. #define L_CYAN      11
  510. #define L_RED      12
  511. #define L_MAGENTA 13
  512. #define YELLOW      14
  513. #define L_WHITE   15
  514. #define INVERSE 0x8000 /* when 640x200x2 text or mode 7, inverse */
  515. #define BRIGHT    0x4000 /* when mode 7, bright */
  516. /* and their use: */
  517. extern unsigned char txtcolor[];
  518. #define C_TITLE       txtcolor[0]+BRIGHT
  519. #define C_TITLE_DEV      txtcolor[1]
  520. #define C_HELP_HDG      txtcolor[2]+BRIGHT
  521. #define C_HELP_BODY      txtcolor[3]
  522. #define C_HELP_INSTR      txtcolor[4]
  523. #define C_HELP_LINK      txtcolor[5]+BRIGHT
  524. #define C_HELP_CURLINK      txtcolor[6]+INVERSE
  525. #define C_PROMPT_BKGRD      txtcolor[7]
  526. #define C_PROMPT_TEXT      txtcolor[8]
  527. #define C_PROMPT_LO      txtcolor[9]
  528. #define C_PROMPT_MED      txtcolor[10]
  529. #define C_PROMPT_HI      txtcolor[11]+BRIGHT
  530. #define C_PROMPT_INPUT      txtcolor[12]+INVERSE
  531. #define C_PROMPT_CHOOSE   txtcolor[13]+INVERSE
  532. #define C_CHOICE_CURRENT  txtcolor[14]+INVERSE
  533. #define C_CHOICE_SP_INSTR txtcolor[15]
  534. #define C_CHOICE_SP_KEYIN txtcolor[16]+BRIGHT
  535. #define C_GENERAL_HI      txtcolor[17]+BRIGHT
  536. #define C_GENERAL_MED      txtcolor[18]
  537. #define C_GENERAL_LO      txtcolor[19]
  538. #define C_GENERAL_INPUT   txtcolor[20]+INVERSE
  539. #define C_DVID_BKGRD      txtcolor[21]
  540. #define C_DVID_HI      txtcolor[22]+BRIGHT
  541. #define C_DVID_LO      txtcolor[23]
  542. #define C_STOP_ERR      txtcolor[24]+BRIGHT
  543. #define C_STOP_INFO      txtcolor[25]+BRIGHT
  544. #define C_TITLE_LOW      txtcolor[26]
  545. #define C_AUTHDIV1      txtcolor[27]+INVERSE
  546. #define C_AUTHDIV2      txtcolor[28]+INVERSE
  547. #define C_PRIMARY      txtcolor[29]
  548. #define C_CONTRIB      txtcolor[30]
  549.  
  550. /* structure passed to fullscreen_prompts */
  551. struct fullscreenvalues
  552. {
  553.    int type;   /* 'd' for decimal, 's' for string, '*' for comment */
  554.            /* 'i' for integer, 'y' for yes=1 no=0              */
  555.            /* 0x100+n for string of length n           */
  556.            /* 'l' for one of a list of strings                 */
  557.    union
  558.    {
  559.       double dval;    /* when type 'd' or 'f'  */
  560.       int    ival;    /* when type is 'i'      */
  561.       char   sval[16];    /* when type is 's'      */
  562.       char  *sbuf;    /* when type is 0x100+n  */
  563.       struct {        /* when type is 'l'      */
  564.      int  val;    /*   selected choice     */
  565.      int  vlen;    /*   char len per choice */
  566.      char **list;    /*   list of values     */
  567.      int  llen;    /*   number of values     */
  568.       } ch;
  569.    } uval;
  570. };
  571.  
  572.